<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="favicon.ico"> 
	<link href="__PUBLIC__/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/page.css" rel="stylesheet">
    <script src="__PUBLIC__/admin/js/jquery.min.js?v=2.1.4"></script>
</head>

<script>
//删除url
var deleteUrl = "{:url('ad/delete')}";
var url = '/{$Request.module}/ad';
</script>

<body class="gray-bg">
    <div class="wrapper wrapper-content" id="server">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5><if condition="$cate_name">{if condition="(isset($cate_name)) AND ($cate_name)"}{$cate_name}{/if}广告列表</h5>
                    </div>
                    <div class="ibox-content">
						<div class="row">
						   <div class="col-sm-7 m-b-xs">
                                <button type="button" class="btn btn-sm btn-primary" id="addar" style="margin-right:15px;"><i class="fa fa-plus" style="color:#FFF;"></i>&nbsp;增加广告</button>
                                <button type="button" class="btn btn-sm btn-danger" id="del">批量删除</button>
                            </div> 
                            
                            <form action="{:url('ad/search')}" method="post" id="form_search">
                            <div class="col-sm-2 m-b-xs">
                                <select class="input-sm form-control input-s-sm inline" name="cate_id">
                                    <option value="0" {if condition="(isset($cate_id)) AND ($cate_id eq 0)"}selected="selected"{/if}>搜索全部</option>
                                    {foreach name="adCateList" item="v"}
                                    <option value="{$v.id}" {if condition="(isset($cate_id)) AND ($cate_id eq $v['id'])"}selected="selected"{/if}>{$v.cate_name}</option>
                                    {/foreach}
                                </select>
                            </div>             

                            <div class="col-sm-3" style="float:right;">
                                <div class="input-group">
                                    <input type="text" name="keyword" placeholder="请输入广告名称" {if condition="(isset($ad_name)) AND ($ad_name)"}value="{$ad_name}"{/if} class="input-sm form-control"> <span class="input-group-btn">
                                    <button type="submit" class="btn btn-sm btn-primary" id="submit_search">搜索</button></span>
                                </div>
                            </div>
                           </form>
                        </div>                          
                        
                        <div id="ajaxpagetest">
                        {include file="ad/ajaxpage" /}
                        </div>
                        
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 全局js -->
    <script src="__PUBLIC__/admin/js/plugins/layer/layer.min.js"></script>
    <script src="__PUBLIC__/admin/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="__PUBLIC__/admin/js/plugins/validate/jquery.validate.min.js"></script>
    <!-- iCheck -->
    <script src="__PUBLIC__/admin/js/plugins/iCheck/icheck.min.js"></script>
    <script src="__PUBLIC__/admin/js/common/ajax.js"></script>
	<script src="__PUBLIC__/admin/js/common/admin.js"></script>
	
</body>
</html>